package com.ithm;

import java.util.Scanner;

import java.util.Scanner;

public class Demo6 {
    public static void main(String[] args) {
        int arr[]={11, 22, 33, 44, 55, 66};
        Scanner sc=new Scanner(System.in);
        System.out.println("第一个数：");
        int a=sc.nextInt();
        System.out.println("第二个数：");
        int b=sc.nextInt();
        int t=change(arr,a,b);
        for (int i = 0; i < arr.length; i++) {
            System.out.println(arr[i]);
        }

    }

    private static int change(int []arr,int a,int b){


        int temp=arr[a];
        arr[a]=arr[b];
        arr[b]=temp;
        return temp;




    }


}